In a typical mass air flow sensor, a sensing element is attached between leadframes that are disposed within a bore or air passage that is formed within the plastic housing of the mass air flow sensor. Because the plastic of the housing expands and contracts in response to changes in the temperature of the surrounding environment, the leadframes will often move significantly relative to one another as the surrounding temperature changes. This relative movement stresses the points at which the sensing elements are attached or welded to the leadframes. Over time, the stress causes the attachment or weld points to fatigue, and ultimately, the mass air flow sensor to fail. The present invention minimizes the amount of stress on the attachment or weld points of the sensing elements due to the thermal expansion and contraction of the plastic housing by controlling the amount of plastic that is disposed between the leadframes, and by the careful placement and orientation of the leadframes.